home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / gcc / ixemlsrc.lha / ixemul / man / cat2 / getfsstat.0 < prev    next >
Text File  |  1996-03-13  |  3KB  |  133 lines

  1.  
  2. GETFSSTAT(2)               UNIX Programmer's Manual               GETFSSTAT(2)
  3.  
  4. NNAAMMEE
  5.      ggeettffssssttaatt - get list of all mounted filesystems
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
  9.      ##iinncclluuddee <<ssyyss//mmoouunntt..hh>>
  10.  
  11.      _i_n_t
  12.      ggeettffssssttaatt(_s_t_r_u_c_t _s_t_a_t_f_s _*_b_u_f, _l_o_n_g _b_u_f_s_i_z_e, _i_n_t _f_l_a_g_s)
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.      GGeettffssssttaatt() returns information about all mounted filesystems.  _B_u_f is a
  16.      pointer to statfs structures defined as follows:
  17.  
  18.      typedef quad fsid_t;
  19.  
  20.      #define MNAMELEN 32     /* length of buffer for returned name */
  21.  
  22.      struct statfs {
  23.          short   f_type;     /* type of filesystem (see below) */
  24.          short   f_flags;    /* copy of mount flags */
  25.          long    f_fsize;    /* fundamental filesystem block size */
  26.          long    f_bsize;    /* optimal transfer block size */
  27.          long    f_blocks;   /* total data blocks in filesystem */
  28.          long    f_bfree;    /* free blocks in fs */
  29.          long    f_bavail;   /* free blocks avail to non­superuser */
  30.          long    f_files;    /* total file nodes in filesystem */
  31.          long    f_ffree;    /* free file nodes in fs */
  32.          fsid_t  f_fsid;     /* filesystem id */
  33.          long    f_spare[6]; /* spare for later */
  34.          char    f_mntonname[MNAMELEN]; /* directory on which mounted */
  35.          char    f_mntfromname[MNAMELEN]; /* mounted filesystem */
  36.      };
  37.      /*
  38.       * File system types.
  39.       */
  40.      #define MOUNT_UFS       1
  41.      #define MOUNT_NFS       2
  42.      #define MOUNT_PC        3
  43.  
  44.      Fields that are undefined for a particular filesystem are set to ­1.  The
  45.      buffer is filled with an array of _f_s_s_t_a_t structures, one for each mounted
  46.      filesystem up to the size specified by _b_u_f_s_i_z_e.
  47.  
  48.      If _b_u_f is given as NULL, ggeettffssssttaatt() returns just the number of mounted
  49.      filesystems.
  50.  
  51.      Normally _f_l_a_g_s should be specified as MNT_WAIT. If _f_l_a_g_s is set to
  52.      MNT_NOWAIT, ggeettffssssttaatt() will return the information it has available
  53.      without requesting an update from each filesystem.  Thus, some of the in­
  54.      formation will be out of date, but ggeettffssssttaatt() will not block waiting for
  55.      information from a filesystem that is unable to respond.
  56.  
  57. RREETTUURRNN VVAALLUUEESS
  58.      Upon successful completion, the number of _f_s_s_t_a_t structures is returned.
  59.      Otherwise, ­1 is returned and the global variable _e_r_r_n_o is set to indi­
  60.      cate the error.
  61.  
  62. EERRRROORRSS
  63.      GGeettffssssttaatt() fails if one or more of the following are true:
  64.  
  65.  
  66.      EFAULT        _B_u_f points to an invalid address.
  67.  
  68.      EIO           An I/O error occurred while reading from or writing to the
  69.                    filesystem.
  70.  
  71. SSEEEE AALLSSOO
  72.      statfs(2),  fstab(5),  mount(8)
  73.  
  74. HHIISSTTOORRYY
  75.      The ggeettffssssttaatt function call is currently under development.
  76.  
  77. BSD Experimental                 July 23, 1991                               2
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.